package com.xujie.application.weather.collectRecords;

import com.xujie.application.weather.collectRecords.service.JsoupService;
import jakarta.annotation.Resource;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author Xujie
 * @since 2024/12/21 00:48
 **/

@Component
public class SchedulePullTask {
	@Resource
	private JsoupService jsoupService;

	@Scheduled(cron = "${weather.pull.interval}", zone = "Asia/Shanghai")
	public void pullWeather() {
		 jsoupService.getWeather();
	}
}
